<h1>Listing links</h1>

<table>
  <tr>
    <th>From</th>
    <th>To</th>
    <th>Body</th>
  </tr>

<% @links.each do |link| %>
  <tr>
    <td><%=h link.e_from %></td>
    <td><%=h link.e_to %></td>
    <td><%=h link.body %></td>
    <td><%= link_to 'Show', link %></td>
    <td><%= link_to 'Edit', edit_link_path(link) %></td>
    <td><%= link_to 'Destroy', link, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>

<%= will_paginate @links %>

</table>

<br />

<%= link_to 'New link', new_link_path %>